package com.sky.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;


/**
 * 信息提示常量类
 */
@Component
public class MessageConstant {

    public static final String PASSWORD_ERROR = "密码错误";
    public static final String ACCOUNT_NOT_FOUND = "账号不存在";
    public static final String ACCOUNT_LOCKED = "账号被锁定";
    public static final String ALREADY_EXISTS = "已存在";
    public static final String UNKNOWN_ERROR = "未知错误";
    public static final String USER_NOT_LOGIN = "用户未登录";
    public static final String CATEGORY_BE_RELATED_BY_SETMEAL = "当前分类关联了套餐,不能删除";
    public static final String CATEGORY_BE_RELATED_BY_DISH = "当前分类关联了菜品,不能删除";
    public static final String SHOPPING_CART_IS_NULL = "购物车数据为空，不能下单";
    public static final String ADDRESS_BOOK_IS_NULL = "用户地址为空，不能下单";
    public static final String LOGIN_FAILED = "登录失败";
    public static final String UPLOAD_FAILED = "文件上传失败";
    public static final String SETMEAL_ENABLE_FAILED = "套餐内包含未启售菜品，无法启售";
    public static final String PASSWORD_EDIT_FAILED = "密码修改失败";
    public static final String DISH_ON_SALE = "起售中的菜品不能删除";
    public static final String FAIL_TO_DELETE = "删除失败";
    public static final String SETMEAL_ON_SALE = "起售中的套餐不能删除";
    public static final String DISH_BE_RELATED_BY_SETMEAL = "当前菜品关联了套餐,不能删除";
    public static final String ORDER_STATUS_ERROR = "订单状态错误";
    public static final String ORDER_NOT_FOUND = "订单不存在";
    public static final String FAIL_TO_UPDATE = "修改失败";
    public static final String FAIL_TO_DELETE_FLAVORS = "删除口味失败";
    public static final String FAIL_INSERT_FLAVORS = "菜品口味插入失败";
    public static final String FAIL_TO_ADD_DISH = "添加菜品失败";
    public static final String SHOP_STATUS_EXCEPTION = "店铺状态异常";
    public static final String UPDATE_FAILED = "更新失败";
    public static final String INSERT_FAILED = "新增失败";
    public static final String DISH_ERROR = "当前菜品已经停售或者删除，不能添加已帮您删除，请刷新页面";
    public static final String INSERT_ERROR = "新增失败";
    public static final String SHOPPING_CART_EXPIRED = "购物车数据过期，请重新添加";
    public static final String SETMEAL_ERROR = "当前套餐已经停售或者删除，不能添加已帮您删除，请刷新页面";
    public static String PRICE_MAX_ERROR;
    @Value("${ShoppingCart.priceMax}")
    private void  MAX_PRICE(String priceMax){
        PRICE_MAX_ERROR = "当前菜品价格超出最大范围，不能添加，最大价格为：" + priceMax + "元";
    }
}
